<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改支付密码')" />
</head>
<body class="white-bg">

<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<div style="font-size: 20px">您已成功绑定，如需解绑请输入谷歌验证码：</div>
	<form class="form-horizontal m" id="form-user-resetPwd">
		<div class="form-group">
			<label class="col-sm-3 control-label">验证码：</label>
			<div class="col-sm-8">
				<input class="form-control" type="text" name="code" id="code">
			</div>
		</div>
	</form>
	<div class="row">
		<div class="col-sm-offset-5 col-sm-10">
			<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>立即解绑</button>&nbsp;
		</div>
	</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
	var ctx = [[@{/}]];
</script>
<script>
	$("#form-user-resetPwd").validate({
		rules:{
			code: {
				required: true
			}
		},
		messages: {
		},
		focusCleanup: true
	});

	function submitHandler() {
		if ($.validate.form()) {
			$.ajax({
				type: "post",
				url: ctx + "system/user/unBindGoogle",
				data: {
					code: $("input[name='code']").val()
				},
				success: function (r) {
					if(r.code == 0){
						location.reload();
					}
					layer.msg(r.msg);
				}
			});
		//	$.operate.post(ctx + "channel/channelUserInfo/resetChannelSendPwd", data);
		}
	}
</script>
</body>

</html>
